﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Domain.Abstract;
using WebUI.Models.BusinessModels;

namespace WebUI.Areas.NhomNcc.Controllers
{
    public class NhomNccController : Controller
    {
        private INhomNccRepository _nhomNccRepository;
        public NhomNccController(INhomNccRepository nhomNccRepository)
        {
            _nhomNccRepository = nhomNccRepository;
        }

        public ActionResult Index()
        {
            var lstNhomNccs = _nhomNccRepository.NhomNccs.Select(x => new NhomNccModel
                                                                          {
                                                                              Id = x.Id,
                                                                              Ten = x.Ten,
                                                                              VietTat = x.VietTat
                                                                          });
            return View(lstNhomNccs);
        }

    }
}
